{% extends "account/password_reset_base.html" %}

{% load i18n %}
{% load bootstrap_form from bootstrap3 %}
{% load staticfiles %}
{% block head_title %}{% trans "Change Password" context "Password reset from key page title" %}{% endblock %}

{% block form %}
  {% if token_fail %}
    <div class="col-sm-12">
      <h2>{% trans "Bad Token" %}</h2>
      {% url 'account_reset_password' as passwd_reset_url %}
      <p>{% blocktrans trimmed context "Password reset text if key is invalid" %}
        The password reset link was invalid, possibly
        because it has already been used.<br>
        Please request a
        <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}
      </p>
    </div>
  {% else %}
    <form method="post" novalidate>
      {% csrf_token %}
      <h2>{% trans "Password Reset" context "Password reset from key form title" %}</h2>
      <p>{% trans "Now you can set new password for you account." context "Password reset from key form title" %}</p>
      <fieldset>
        {% bootstrap_form form %}
      </fieldset>
      <div class="row login__btn-group">
        <div class="col-sm-12">
          <button class="btn primary narrow">
            {% trans "Continue" context "Password reset from key form primary action" %}
          </button>
          <img src="{% static "images/pirate-reset.png" %}" />
        </div>
      </div>
    </form>
  {% endif %}
{% endblock %}
